package models

type StareCount struct {
	ID          string `gorm:"primaryKey;column:id;type:bigint;not null;comment:id" json:"id"`
	MerchantID  string `gorm:"column:merchant_id;type:varchar(30);not null;default:'';comment:商户id" json:"merchant_id"`
	RobotName   string `gorm:"column:robot_name;type:varchar(50);not null;default:'';comment:设备名称;index:idx_date_starecount,priority:2;index:idx_startTime_robotName,priority:2;" json:"robot_name"`
	StartTime   int64  `gorm:"column:start_time;type:int;size:64;not null;default:0;comment:起始时间;index:idx_startTime_robotName,priority:1;" json:"start_time"`
	EndTime     int64  `gorm:"column:end_time;type:int;size:64;not null;default:0;comment:结束时间" json:"end_time"`
	StareCount0 int64  `gorm:"index:idx_date_starecount,priority:3;column:stare_count0;type:int;not null;default:0;comment:前凝视" json:"stare_count0"`
	StareCount1 int64  `gorm:"index:idx_date_starecount,priority:4;column:stare_count1;type:int;not null;default:0;comment:左凝视" json:"stare_count1"`
	StareCount2 int64  `gorm:"index:idx_date_starecount,priority:5;column:stare_count2;type:int;not null;default:0;comment:右凝视" json:"stare_count2"`
	StareCount3 int64  `gorm:"index:idx_date_starecount,priority:6;column:stare_count3;type:int;not null;default:0;comment:后凝视" json:"stare_count3"`
	LocationID  int64  `gorm:"column:location_id;type:bigint;default:0;comment:商场ID" json:"location_id"`
	CreatedDate string `gorm:"index:idx_date_starecount,priority:1;column:created_date;type:varchar(10);not null;default:'1970-01-01';comment:日期" json:"created_date"`
	CreatedAt   int64  `gorm:"column:created_at;autoCreateTime;type:int;size:64;default:0;comment:创建时间" json:"created_at"`
	UpdatedAt   int64  `gorm:"column:updated_at;autoUpdateTime;type:int;size:64;default:0;comment:修改时间" json:"updated_at"`
}

func (m StareCount) TableName() string {
	return "stare_count"
}

// 模式自动注册
func init() {
	Models = append(Models, &StareCount{})
}

// 用于分表的model
type StareCountTpl struct {
	StareCount
}

func (m StareCountTpl) TableName() string {
	return "stare_count_tpl"
}
